// PartCrudeDataSet.h: interface for the PartCrudeDataSet class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PARTCRUDEDATASET_H__6BC1ACDF_DC5B_4B98_86F9_D7EED0F567AA__INCLUDED_)
#define AFX_PARTCRUDEDATASET_H__6BC1ACDF_DC5B_4B98_86F9_D7EED0F567AA__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "ObjectGenerator.h"
#include "Part.h"
#include "DataSet.h"

class AFX_EXT_CLASS PartCrudeDataSet  : public PropertyDataSet
{
public:
	PartCrudeDataSet();
	virtual ~PartCrudeDataSet();

private:
	CString GetDataTableName(const CString& strID);
	CString GetCustomIDField(const CString& strPartID);

public:
	BOOL InstancePart(Part* pPart, const CString& strBH);
	BOOL InstancePart(Part* pPart, const CString& strID, const CString& strTerm);

private:
	BOOL GetPartCrudeData(Part* pPart, const CString& strSql);
};

typedef ObjectGenerator<PartCrudeDataSet> PartCrudeDataSetGenerator;
#endif // !defined(AFX_PARTCRUDEDATASET_H__6BC1ACDF_DC5B_4B98_86F9_D7EED0F567AA__INCLUDED_)
